package com.william.modules.system.schedules;

import com.william.modules.test.service.ISysSecondService;
import com.william.modules.william.service.ISysMainService;
import com.william.modules.william.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class WilliamSyncJob {

    @Autowired
    private ISysMainService sysMainService;

    //每六小时执行一次  0 0 0/6 * * ? *
    //每一分钟  0 * * * * ? *
    @Scheduled(cron = "0/10 * * * * *")
    public void job(){
        System.out.println( "=========定时任务=========");
        sysMainService.synchData();
    }


}
